/*
** my_strncmp.c for my_strncmp in /home/gueux_g/piscine/Jour_06
**
** Made by gregory gueux
** Login   <gueux_g@epitech.net>
**
** Started on  Tue Oct  9 00:58:40 2012 gregory gueux
** Last update Wed Dec 12 21:58:15 2012 gregory gueux
*/

int	my_strncmp(const char *s1, const char *s2, int n)
{
  char	u1;
  char	u2;

  while (n-- > 0)
    {
      u1 = (char) *s1++;
      u2 = (char) *s2++;
      if (u1 != u2)
	return u1 - u2;
      if (u1 == '\0')
	return 0;
    }
  return 0;
}
